home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 001a / com_and3.zip / DSZUP.CMD < prev    next >
OS/2 REXX Batch file  |  1989-10-09  |  1KB  |  56 lines

  1. ; ----- DSZUP: Invoke DSZ to upload.
  2. ; ----------------------------------------------------------------
  3. ;    Note: This script invokes DSZ, using the current comm port
  4. ;    settings.  Note that the 'sz' sent to DSZ invokes a ZMODEM
  5. ;    download.  Change 'sz' to 'rb' for YMODEM-BAtch...
  6. ; ----------------------------------------------------------------
  7. ;
  8. ;    Get the file spec to upload
  9. ;
  10.     GOSUB Get_Name        ; Read file name into S0
  11.     IF FAILED        ; If ESC pressed
  12.        EXIT         ; Stop here
  13.        ENDIF
  14. ;
  15. ;    Set-up and run DSZ
  16. ;
  17.     COMPARMS S1        ; read current settings
  18.     S2 =  "DSZ.COM port " * S1(14:14) * " sz " * S0 ; e.g. "DSZ port 2 sz"
  19.     RUN S2            ; Load and run DSZ
  20. ;
  21. ;    Play a tune to signal completion
  22. ;
  23.     IF SUCCESS
  24.        PLAY "T200MNO2G24O3C24E24G8G24G24G24G8E8E24E24E24E8C8E8C8O2G8"
  25.     ELSE
  26.        PLAY "ms t250 o2 c2d8e-cp4 >c2d8e-cp4g-1 p2"
  27.     ENDIF
  28.     EXIT
  29. ;
  30. ; ----- Subroutine: Open a window and ask for a file name
  31. ;    SUCCESS/Failed returned to indicate ESCape
  32. ;    S0 returns the name
  33. ;
  34. Get_Name:
  35.     WOPEN 10 10 13 70 (Default) ESC
  36.     ATSAY 10 ,12 (default)    " DSZ upload "
  37.     ATSAY 11 ,11 (default)    " Specify the file name:"
  38.     ATSAY 13  30 (default) " Press ESC to exit "
  39.     ATGET 12, 12 (default) 54 S0
  40.     WCLOSE
  41.     ;
  42.     ;    If null response, return failed
  43.     ;
  44.     SET SUCCESS ON        ; Default return
  45.     LJ S0            ; Left justify
  46.     IF NULL S0
  47.        SET SUCCESS OFF
  48.        ENDIF
  49.     RETURN
  50.     ;
  51.     ;    ESC hit during entry
  52.     ;
  53. ESC:
  54.     S0 = ""                 ; Make a null return
  55.     RETURN
  56.